<?php use_javascript('jquery-1.4.4.min.js') ?>
<?php use_javascript('jquery-ui-1.8.9.custom.min.js') ?>
<?php use_javascript('datepicker-fr.js') ?>
<?php use_stylesheet('jquery-ui-1.8.9.custom.css') ?>

<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('requests/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post">
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields(false) ?>
          <input type="submit" value="<?php echo __('Save') ?>" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['from']->renderLabel() ?></th>
        <td>
          <?php echo $form['from']->renderError() ?>
          <?php echo $form['from'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['to']->renderLabel() ?></th>
        <td>
          <?php echo $form['to']->renderError() ?>
          <?php echo $form['to'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['typeId']->renderLabel() ?></th>
        <td>
          <?php echo $form['typeId']->renderError() ?>
          <?php echo $form['typeId'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['askComment']->renderLabel() ?></th>
        <td>
          <?php echo $form['askComment']->renderError() ?>
          <?php echo $form['askComment'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>